package com.example.campus.dao.model;

import com.example.campus.common.BusinessConstants;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.validation.annotation.Validated;

import java.util.Date;

/**
 * 整个夏令营活动
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Activity {
    @NotNull(message = "Id of Activity cannot be null")
//            因该使用包装类型, 原始类型 不会为null, 会自动为默认值0
    Long id;

    String name;
    String category;
    String title;
    String creator;
    String abstraction;
    String detailedDesc;
    String picUrls;


    @DateTimeFormat(pattern = BusinessConstants.TIME_FORMAT)
    Date createdTime;
    @DateTimeFormat(pattern = BusinessConstants.TIME_FORMAT)
    Date archivedTime;
    @DateTimeFormat(pattern = BusinessConstants.TIME_FORMAT)
    Date startTime;
    @DateTimeFormat(pattern = BusinessConstants.TIME_FORMAT)
    Date endTime;
    int status;

}
